﻿using System;

namespace RaytracerLib.Resamplers.Filters
{
    public class NearestNeighbourFilter : Filter
    {
        public override string Name
        {
            get
            {
                return "Nearest neighbour";
            }
        }

        public NearestNeighbourFilter()
            : base(0.001)
        { 
        }

        public override FilterType FilterType
        {
            get
            {
                return FilterType.NearestNeighbour;
            }
        }

        public override double Evaluate(double a_value)
        {
            if (a_value.IsAlmostEquals(0))
                return 1; 
            else
                return 0;
        }

        public override string ToString()
        {
            return "Nearest neighbour";
        }
    }
}